#region Imported Namespaces



using System;



#endregion


namespace WtfManager.UIManager
{
  ///<summary>
  /// Marks a class as content container.
  ///</summary>
  [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
  public class ContentContainerAttribute: Attribute
  {
    #region Fields



    private readonly Type _contentType;
    private readonly bool _strictMatch;



    #endregion


    #region Constructors/Finalizers



    ///<summary>
    /// ContentContainerAttribute constructor.
    ///</summary>
    ///<param name="contentType">The type of content, that can be hosted inside content container.</param>
    ///<param name="strictMatch">If set to true, the content type must strictly match the specified <see cref="ContentType"/>,
    /// otherwise it can be a subclass of <see cref="ContentType"/>.</param>
    public ContentContainerAttribute(Type contentType, bool strictMatch)
    {
      _contentType = contentType;
      _strictMatch = strictMatch;
    }



    #endregion


    #region Properties/Indexers



    ///<summary>
    /// Gets content <see cref="Type"/>, that can be hosted inside content container.
    ///</summary>
    public Type ContentType
    {
      get
      {
        return _contentType;
      }
    }

    ///<summary>
    /// If true, the content type must strictly match the specified <see cref="ContentType"/>,
    /// otherwise it can be a subclass of <see cref="ContentType"/>.
    ///</summary>
    public bool StrictMatch
    {
      get
      {
        return _strictMatch;
      }
    }



    #endregion
  }
}